package com.zzyl.mapper;

import com.zzyl.entity.UserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

@Mapper
public interface UserRoleMapper {



    int deleteByPrimaryKey(Long id);

    int insert(UserRole record);

    int insertSelective(UserRole record);

    UserRole selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(UserRole record);

    int updateByPrimaryKey(UserRole record);

    /**
     * 这是Mybatis Generator拓展插件生成的方法(请勿删除).
     * This method corresponds to the database table sys_user_role
     *
     * @mbg.generated
     * @author hewei
     */
    int batchInsert(@Param("list") List<UserRole> list);

    /**
     * 查找roleids
     * 删除角色资源的数据
     * @param roleId
     */
    void dele(Long roleId);

    Set<String> findRoleVoIdsByUserId(Long id);

    /**
     * 查找lable
     * @param id
     * @return {@link Set }<{@link String }>
     */
    Set<String> findLabelsByUserId(Long id);

    List<String> findRoleVoListByUserIds(List<Long> userIds);

    /**
     * 根据id查询部门
     * @param id
     */
    void findDept(Long id);
}